//数据存储渲染并打印内容
const box1 = new Vue({
  el: "#box1",
  data: {
    arr: [
      { url: "./img/1.png", text: "Clarks 其乐男鞋2020经典款 Edgewood Mix 休闲鞋透气软..", price: "￥905.00" },
      { url: "./img/2.png", text: "罗莱( LUOLAl ) LOv O 床上枕套高密丝滑柔软缎….", price: "￥15.00" },
      { url: "./img/3.png", text: "Lola Rose 【江疏影同款】经典小绿表手表女英国…", price: "￥1280.00" },
      { url: "./img/4.png", text: "惠寻日式冰川纹玻璃杯 ins 风,果汁茶杯家用简约高款…", price: "￥14.90" }
    ]
  },
  methods: {
    btn (index) {
      alert(this.arr[index].text)
    }
  }
});

//双向绑定数据，实现数据新增
const box2 = new Vue({
  el: "#box2",
  data: {
    inputVal: "",
    old: [""]
  },
  methods: {
    btn () {
      this.old.push(this.inputVal);
      this.inputVal = ""
    }
  }
})